
import React, { Component } from 'react';

import "../styles/MyTabbar.scss"

class MyTabbar extends Component {

    constructor(props) {
        super(props);
        this.state = { //state中保存的值就是组件的状态
            list: [
                { text: '店铺' },
                { text: '分类' },
                { text: '全部商品' },
                { text: '购物车' },
                { text: '个人中心' },
            ]
        }
    }
    render() {
        return (
            <div className='Tabbar'>
                {
                    this.state.list.map((item, index) => {
                        return (
                            <div className="item" key={index}>
                                <div className="text">{item.text}</div>
                            </div>
                        )
                    })
                }
            </div>
        );
    }
}

export default MyTabbar;